#include <stdio.h>
//利用指针实现两个整数由大到小排序
int main()
{
    void swap(int *p1 , int *p2);
    int a,b;
    int *pointer1 , *pointer2;
    printf("please enter a and b:");
    scanf("%d,%d",&a,&b);
    pointer1=&a;
    pointer2=&b;
    if (a<b)
    swap(pointer1,pointer2);
    printf("max=%d,min=%d",a,b);    

}

void swap(int *p1 , int *p2)
{
    int tmp;
    
    tmp=*p1;
    *p1=*p2;
    *p2=tmp;
}


